#ifndef SF_SINGLETON_H_
#define SF_SINGLETON_H_
#pragma once
#pragma warning(disable : 4661)
namespace SF
{

template<class Type>
class Singleton
{
private:
    static Type         *pInstance_;
public:
	static Type& GetInstance(void){return *GetInstancePtr();}
	static Type* GetInstancePtr(void){if(!pInstance_){pInstance_ = new Type;}return pInstance_;}
protected:
	Singleton(void){}
	Singleton(const Singleton<Type>&){};
	Singleton<Type> operator=(const Singleton<Type>&){return Singleton<Type>();};
}; 
        
}

#endif
